<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content='text/html; charset="utf-8"'>
<title>Insert title here</title>
<script src="js/jquery-1.12.4.js"></script>
<script>
	$(function() {
		$("#username").blur(function() {
			$.get("check", {username : $(this).val()},
					function(data) {
				if (data > 0) {
					$("#tips").text("用户名存在");
				} else {
					$("#tips").text("用户名不存在");
				}
			})
		})

	})
</script>
</head>
<body>
	<form action="doLogin" method="post">
		用户名:<input type="text" name="username" id="username"><span id="tips"></span>
		 密码:<input type="password" name="password">
		<input type="hidden" name="returnUrl" value="${param. returnUrl}">
		<input type="submit" value="登录">
	</form>
	<h3>${error}</h3>
</body>
</html>